function main() {


if(false)
{
    var dlopen = Module.findExportByName(null, "dlopen")
    console.log("dlopen", dlopen)
    Interceptor.attach(dlopen, {
        onEnter: function (args) {

            var fileName = ptr(args[0]).readCString()
            console.log(fileName)


        }, onLeave: function (ret) {

            return ret
        }
    })
}
if(false)
{
    var dlopen_ext = Module.findExportByName(null, 'android_dlopen_ext')
    Interceptor.attach(dlopen_ext, {
        onEnter: function (args) {

            var fileName = ptr(args[0]).readCString()
            console.log(fileName)

        }, onLeave: function (ret) {

            return ret
        }
    })
}
if(false)
{
    var fopen = Module.findExportByName(null, 'fopen')
    Interceptor.attach(fopen, {
        onEnter: function (args) {

            var fileName = ptr(args[0]).readCString()
            console.log(fileName)

            console.log(
                Thread.backtrace(this.context, Backtracer.ACCURATE)
                    .map(DebugSymbol.fromAddress).join('\n') + '\n')

        }, onLeave: function (ret) {

            return ret
        }
    })
}

    //sub_80DE48(__int64 a1)
    //v18 = *(_QWORD *)(a1 + 0x288);
    //*(_DWORD *)(v18 + 0x60) = v3;
  var baseAddress = Module.findBaseAddress("libil2cpp.so")
  // var setTimeScale = new NativeFunction(baseAddress.add(0x6E6CDC), "pointer", ["float"])
  // setTimeScale(5)

    Interceptor.attach(baseAddress.add(0x80DE48) , {
        onEnter: function (args) {

            console.log("0x80DE48")
            console.log(args[0])

        },
        onLeave: function (ret) {

            return ret
        }
    })
    //
    Interceptor.attach(baseAddress.add(0x80DFE0) , {
        onEnter: function (args) {
            console.log("0x80DFE0")
            console.log(args[0])

        },
        onLeave: function (ret) {

            return ret
        }
    })


}

setImmediate(main)
// setInterval(function(){
//
//   }, 100)




// frida -U --no-pause -f  com.tencent.dm -l hooklibc.js
// frida -U --no-pause -f  com.xingin.xhs -l hooklibc.js
// frida -U --no-pause -f  com.tencent.mm -l hooklibc.js
// frida -U --no-pause -f  com.ss.android.ugc.aweme -l hooklibc.js
// frida -U --no-pause -f  com.mmzztt.app -l hooklibc.js
// frida -U --no-pause -f  com.yrtgame.stickvar.aligames -l lzjx.js
// frida -U  com.yrtgame.stickvar.aligames -l lzjx.js